//
//  ActivityNewsTableViewCell.swift
//  TianTianBiTing
//
//  Created by Gox mac 2 on 2019/3/8.
//  Copyright © 2019 Gox_WallyDiao. All rights reserved.
//

import UIKit

class ActivityNewsTableViewCell: UITableViewCell {
    var titleLabel:UILabel = UILabel()
    var describeLabel:UILabel = UILabel()
    var backImage:UIImageView = UIImageView()
    var checkLabel:UILabel = UILabel()
    var checkImage:UIImageView = UIImageView()
    var lineView:UIView = UIView()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        setUI()
    }
    
    
    func setUI() {
        backImage.layer.cornerRadius = 4
        backImage.layer.masksToBounds = true
        contentView.addSubview(backImage)
        
        titleLabel.font = Font_Bold(14)
        titleLabel.textColor = RGB_Same(53)
        contentView.addSubview(titleLabel)
        
        describeLabel.font = Font_Medium(11)
        describeLabel.textColor = RGB_Same(136)
        contentView.addSubview(describeLabel)
        
        checkLabel.font = Font_Medium(14)
        checkLabel.textColor = RGB_Same(53)
        checkLabel.text = "查看详情"
        checkLabel.textAlignment = .center
        contentView.addSubview(checkLabel)
        
        checkImage.layer.cornerRadius = 7.2
        checkImage.layer.masksToBounds = true
        checkImage.image = IMAGE(name: "mine进入详情")
        contentView.addSubview(checkImage)
        
        lineView.backgroundColor = RGB_Same(240, 1)
        contentView.addSubview(lineView)
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        
        // Configure the view for the selected state
    }
    
    override func layoutSubviews() {
        titleLabel.frame = FRAME_CGFloat(10, 20, SCREEN_WIDTH - 20, 20)
        describeLabel.frame = FRAME_CGFloat(10, 47.5, SCREEN_WIDTH - 20, 15)
        backImage.frame = FRAME_CGFloat(27.5, 70, SCREEN_WIDTH - 55, SCREEN_SCALE_X(x: 137))
        checkLabel.frame = FRAME_CGFloat(SCREEN_WIDTH / 2 - 30, 80 + SCREEN_SCALE_X(x: 137), 60, 20)
        checkImage.frame = FRAME_CGFloat(SCREEN_WIDTH / 2 + 35, 83.5 + SCREEN_SCALE_X(x: 137), 23.5, 14.5)
        lineView.frame = FRAME_CGFloat(10, 110 + SCREEN_SCALE_X(x: 137), SCREEN_WIDTH - 20, 1)
        
    }

}
